home *** CD-ROM | disk | FTP | other *** search
/ Nejlepší hry / Nejlepsi hry.iso / hry / sea of chaos / sea_install.msi / _15C39AAA7726369D39812BD40F01CF6A / _5B3D840B9F9444938D1515A9F19D8204 < prev    next >
Text File  |  2004-11-13  |  468b  |  27 lines

  1. //simple shader: combine color and texture sample
  2. //Luke Lenhart
  3. //(C)2004-2005 Digipen Institute of Technology
  4.  
  5. //cloud sampler
  6. sampler2D sampTex;
  7.  
  8. //shader input
  9. struct PS_INPUT
  10. {
  11.     float4 Color : COLOR;
  12.     float2 Tex0 : TEXCOORD0;
  13. };
  14.  
  15. //shader code
  16. float4 PShader(PS_INPUT In) : COLOR
  17. {
  18.     //sample textutes
  19.     float4 texclr=tex2D(sampTex,In.Tex0);
  20.     
  21.     //blend with vert color
  22.     float4 clr=texclr*In.Color;
  23.     
  24.     //spit out color
  25.     return clr;
  26. }
  27.